package com.hyt.it.ogt.kq.service.bm.feign.pt;

import com.hyt.common.apiInfor.ApiResponse;
import com.hyt.it.ogt.kq.service.bm.feign.pt.model.MessageApiVo;
import com.hyt.it.ogt.kq.service.bm.feign.pt.model.NoticeInfo;
import com.hyt.it.ogt.kq.service.bm.feign.pt.model.SysMessageResultVo;
import com.hyt.loginfo.config.OAuth2FeignRequestConfig;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(value = "it-ogt-sq", contextId = "bm-it-ogt-pt",fallback = PtClientHystrix.class, configuration = OAuth2FeignRequestConfig.class)
public interface PtClient {

    @RequestMapping(value = "/pt/kwApi/querySysMessage", method = RequestMethod.GET)
    ApiResponse<List<SysMessageResultVo>> querySysMessage(@RequestParam("eventCode") String eventCode) throws Exception;

    @RequestMapping(value = "/pt/kwApi/sendNoticeInfo", method = RequestMethod.POST)
    ApiResponse sendNoticeInfo(@RequestBody List<NoticeInfo> list) throws Exception;

    @RequestMapping(value = "/pt/kwApi/sendSysMessage", method = RequestMethod.POST)
    void sendSysMessage(@RequestBody List<MessageApiVo> list) throws Exception;
}
